package com.thread.sync;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class TestMainLocker {

	public static void main(String[] args) {

		Lock object1 = new ReentrantLock();
		Lock object2 = new ReentrantLock();
		PrintRunnableSync a = new PrintRunnableSync("a", object1, object2);
		PrintRunnableSync b = new PrintRunnableSync("b", object2, object1);
		
		new Thread(a).start();
		new Thread(b).start();
		
	}

}
